package com.sparrow.common.metric.domain;

import java.util.function.Supplier;

public class Gauge {

    private final String name;
    private final Supplier<Double> func;

    public Gauge(String name, Supplier<Double> func) {
        this.name = name;
        this.func = func;
    }

    public String getName() { return name; }

    public double getValue() {
        return func.get();
    }


}
